
extern void *malloc(int size);
#define NULL (void*)0
void print(char *fmt, ...);
int strlen(char* s);
char* strcpy(char* t,char* s);

char* strdup(char* s) {
	
	char* t;

	//print("in strdup\n");

	t = malloc(strlen(s)+1);
	if(t == NULL) {
		print("strdup failed\n");
		return NULL;
	}
	
	strcpy(t,s);

	return t;

}
